/**
 * 
 * @param ba
 * @param bmpd
 * 
 */
private function writeDefineBitsLossless2(bmpd:BitmapData, charID:uint, ba:ByteArray):void {
	// RECORDHEADER (long)
	ba.len
	ba.writeByte(0x00); // 1
	ba.writeByte(0x00); // 2
	ba.writeByte(0x00); // 3
	ba.writeByte(0x00); // 4
	ba.writeByte(0x00); // 5
	ba.writeByte(0x00); // 6

	// CharacterID UI16
	ba.writeShort(charID);

	// BitmapFormat UI8
	ba.writeByte(0x05); // 0x05 32-bit ARGB image

	// BitmapWidth UI16
	ba.writeShort(bmpd.width);

	// BitmapHeight UI16
	ba.writeShort(bmpd.height);

	var data:ByteArray = bmpd.getPixels(bmpd.rect);
	data.compress();

	// ZlibBitmapData
	ba.writeBytes( data );

	// Tag type = 36
	this.writeTag(0x24, ba);
}